package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 3:08:52 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TbPais generated by hbm2java
 */
@Entity
@Table(name = "TB_PAIS", schema = "CATALOGOS")
public class TbPais implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String cpais;
	private String cusuario;
	private String dpais;
	private Integer bdesplegable;
	private Integer bstatus;
	private Date fhingreso;
	private Set<RcRuc> rcRucs = new HashSet<RcRuc>(0);

	public TbPais() {
	}

	public TbPais(String cpais, String cusuario, String dpais,
			Integer bdesplegable, Integer bstatus) {
		this.cpais = cpais;
		this.cusuario = cusuario;
		this.dpais = dpais;
		this.bdesplegable = bdesplegable;
		this.bstatus = bstatus;
	}

	public TbPais(String cpais, String cusuario, String dpais,
			Integer bdesplegable, Integer bstatus, Date fhingreso,
			Set<RcRuc> rcRucs) {
		this.cpais = cpais;
		this.cusuario = cusuario;
		this.dpais = dpais;
		this.bdesplegable = bdesplegable;
		this.bstatus = bstatus;
		this.fhingreso = fhingreso;
		this.rcRucs = rcRucs;
	}

	@Id
	@Column(name = "C_PAIS", unique = true, nullable = false, length = 4)
	public String getCpais() {
		return this.cpais;
	}

	public void setCpais(String cpais) {
		this.cpais = cpais;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

        
	@Column(name = "D_PAIS", nullable = false, length = 60)
	public String getDpais() {
		return this.dpais;
	}

	public void setDpais(String dpais) {
		this.dpais = dpais;
	}

	@Column(name = "B_DESPLEGABLE", nullable = false, precision = 1, scale = 0)
	public Integer getBdesplegable() {
		return this.bdesplegable;
	}

	public void setBdesplegable(Integer bdesplegable) {
		this.bdesplegable = bdesplegable;
	}

	@Column(name = "B_STATUS", nullable = false, precision = 1, scale = 0)
	public Integer getBstatus() {
		return this.bstatus;
	}

	public void setBstatus(Integer bstatus) {
		this.bstatus = bstatus;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbPais")
	public Set<RcRuc> getRcRucs() {
		return this.rcRucs;
	}

	public void setRcRucs(Set<RcRuc> rcRucs) {
		this.rcRucs = rcRucs;
	}

}
